import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import pinia from './store'
import Layui from '@layui/layui-vue'
import '@layui/layui-vue/lib/index.css'
import axios from 'axios';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import 'element-plus/theme-chalk/index.css'
import locale from 'element-plus/es/locale/lang/zh-cn'

import LayJsonSchemaForm from "@layui/json-schema-form";
import "@layui/json-schema-form/lib/index.css";

import layer from '@layui/layer-vue';
import '@layui/layer-vue/lib/index.css';

createApp(App).use(pinia).use(router).use(ElementPlus, { locale }).use(Layui).use(layer).use(LayJsonSchemaForm).use(axios).mount('#app')

window.ResizeObserver = class _NewResizeObserver extends ResizeObserver {
    constructor(callback) {
        super(() => window.requestAnimationFrame(() => callback.apply(this, arguments)));
    }
}
